<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Magic 口碑营销平台</title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="stylesheet" href="../css/reset.css">
<link rel="stylesheet" href="../css/header.css">
</head>
<body>
<div id="header">
  <p>你好，caigen1023 [<a href="#">安全退出</a>] [<a href="#">修改密码</a>]</p>
  <h1><a href="frame.html" target="_top"><em>Magic</em>口碑营销平台</a></h1>
  <div id="main-menu">
    <ul>
      <li class="current"><a href="nav.html" contentSrc="task_leader.html">会员营销</a></li>
      <li><a href="nav.html?hideNav" contentSrc="template_add.html">积分兑换<i class="new"></i></a></li>
    </ul>
  </div>
</div>
<script>
(function(){
		var links = document.getElementById("main-menu").getElementsByTagName("a"),
				lis = document.getElementById("main-menu").getElementsByTagName("li"),
				preIndex = 0;
				
		for(var i=0,j=links.length;i<j;i++){
				(function(index){
						links[index].onclick = function(){
								var topDoc = window.top.document;
								topDoc.getElementById("nav").src = this.href;
								topDoc.getElementById("content").src = this.getAttribute("contentSrc");
								lis[preIndex].className = "";
								lis[index].className = "current";
								preIndex = index;
								return false;
						}
				})(i);
		}
})();
</script>
</body>
</html>